package cn.edu.pku.nggis.remotesensingdigitalimageprocessing;

public abstract class ClassifyProcesses {

	public static ClassifyProcess seekMethodFromName(String methodName) {
		ClassifyProcess cp = null;
		methodName = methodName.trim();
		if (methodName.equals("default")) {
			methodName = methodNameList[2];
		}
		if (methodName.equals(methodNameList[0])) {
			cp = new MinimalDistanceClassifyProcess();
		} else if (methodName.equals(methodNameList[1])) {
			cp = new KMeansClassifyProcess();
		} else if (methodName.equals(methodNameList[2])) {
			cp = new RadialBasisFunctionClassifyProcess();
		} else {
			throw new IllegalArgumentException(methodName
					+ " method not found.");
		}

		return cp;
	}

	public static final String[] methodNameList = { "MinimalDistance",
			"k-means", "RBF" };

}
